function figure_wages()
    h=figure(1);
    figure_SLICE();
    saveas(h,'figure_wages_SLICE.fig');
    h=figure(2);
    figure_CARE();
    saveas(h,'figure_wages_CARE.fig');
end

function figure_SLICE()
    load('wages.mat','Age','Education','Experience','Wage');
    grid on;
    maxcoord=max([Wage;Age]);
    mincoord=min([Wage;Age]);
    [x,y] = meshgrid(mincoord-7:maxcoord-mincoord+14:maxcoord+7);
    x=x-10;
    z = (0.714802*y-0.033263*x-12.931738)/0.698535;    
    surf(x,y,z,'FaceColor','yellow','FaceAlpha',0.3);
    hold on;
    z = (0.711784*y-0.133010*x-12.375147)/0.689690;
    surf(x,y,z,'FaceColor','blue','FaceAlpha',0.3);
    hold on;
    plot3(Wage,Age,Experience,'r.');
    hold on;
end

function figure_CARE()
    load('wages.mat','Age','Education','Experience','Wage');
    grid on;
    maxcoord=max([Wage;Age]);
    mincoord=min([Wage;Age]);
    [x,y] = meshgrid(mincoord-7:maxcoord-mincoord+14:maxcoord+7);
    x=x-10;
    z = (0.711670*y-0.107568*x-12.497655)/0.694230;    
    surf(x,y,z,'FaceColor','yellow','FaceAlpha',0.3);
    hold on;
    plot3(Wage,Age,Experience,'r.');
    hold on;
end



